package com.immortal.core.module.sigar;

import java.io.File;
import java.util.Arrays;

/**
 * <p>OSInfo
 *
 * @author wind
 * @version 1.0
 * @since 2018/12/12
 */
public class OSInfo {
    private String filePath;
    private File file;
    private String[] libPath;
    private String[] osInfo;

    public File getFile() {
        return file;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public String[] getLibPath() {
        return libPath;
    }

    public void setLibPath(String[] libPath) {
        this.libPath = libPath;
    }

    public String[] getOsInfo() {
        return osInfo;
    }

    public void setOsInfo(String[] osInfo) {
        this.osInfo = osInfo;
    }

    public OSInfo(String filePath, File file, String[] libPath, String[] osInfo) {
        this.filePath = filePath;
        this.file = file;
        this.libPath = libPath;
        this.osInfo = osInfo;
    }

    public OSInfo() {
    }

    public static OSInfo.OSInfoBuilder builder() {
        return new OSInfo.OSInfoBuilder();
    }

    public static class OSInfoBuilder {
        private String filePath;
        private File file;
        private String[] libPath;
        private String[] osInfo;

        OSInfoBuilder() {
        }

        public OSInfo.OSInfoBuilder filePath(final String filePath) {
            this.filePath = filePath;
            return this;
        }

        public OSInfo.OSInfoBuilder file(final File file) {
            this.file = file;
            return this;
        }

        public OSInfo.OSInfoBuilder libPath(final String... libPath) {
            this.libPath = libPath;
            return this;
        }

        public OSInfo.OSInfoBuilder osInfo(final String... osInfo) {
            this.osInfo = osInfo;
            return this;
        }

        public OSInfo build() {
            return new OSInfo(this.filePath, this.file, this.libPath, this.osInfo);
        }

        @Override
        public String toString() {
            return "OSInfo.OSInfoBuilder(filePath=" + this.filePath + ", file=" + this.file + ", libPath=" + Arrays.deepToString(this.libPath) + ", osInfo=" + Arrays.deepToString(this.osInfo) + ")";
        }
    }
}
